MacHTTP File Naming

Any WWW server and/or client will have problems with spaces in file names, as they violate the syntax of a legal URL. A URL may not contain spaces or unprintable ASCII. A space is used to indicate the end of the URL and the beginning of any client-specified arguments. There is a specific syntax for URLs and it is discussed in the MacHTTP documentation (although briefly). There is also a link in the MacHTTP ReadMe.html file to the tutorial on URLs at NCSA.

In short, a URL to a file named "Some File Name" must have spaces and unprintables encoded with the "%xx" syntax, where "xx" is a 2 character hex representation of the encoded character. In this example, the URL might be: http://some.host.edu/Some%20File%20Name

The burden is on the HTML author and/or WWW client user to specify URLs correctly. MacHTTP must follow the syntax of URLs and interpret a space as indicating the end of the URL. Otherwise, clients and users that DO follow the syntax will have their requests fail.


4/19/94 - gneufeld
MacHTTP Contents